package com.leanin.form.model.response.eduform;

import com.leanin.form.model.response.ResultCode;
import lombok.ToString;

/**
 * @author CPJ.
 * @date 2019/6/17.
 * @time 15:51.
 */
@ToString
public enum EduFormCode implements ResultCode {

    SUCCESS(true,200,"操作成功！"),
    FORM_NAME_REPETITION(false,500,"宣教表单名称重复,请重新填写宣教表单名称！"),
    FORM_NAME_NULL(false,501,"宣教表单名称为空,请填写宣教表单名称"),
    FORM_NAME_LENGTH_ERROR(false,501,"宣教表单名称超过50字,请重新填写宣教表单名称"),
    FORM_TITLE_LENGTH_ERROR(false,501,"宣教表单头超过150字,请重新填写宣教表单头"),
    FORM_END_LENGTH_ERROR(false,501,"宣教表单尾超过150字,请重新填写宣教表单尾"),
    FORM_CONTENT_NULL(false,502,"宣教表单内容为空，请填写宣教表单内容"),
    FORM_NOT_EXIST(false,503,"宣教表单不存在!");
    //    private static ImmutableMap<Integer, CommonCode> codes ;
    //操作是否成功
    boolean success;
    //操作代码
    int status;
    //提示信息
    String message;

    private EduFormCode(boolean success,int status, String message){
        this.success = success;
        this.status = status;
        this.message = message;
    }

    @Override
    public boolean success() {
        return success;
    }
    @Override
    public int status() {
        return status;
    }

    @Override
    public String message() {
        return message;
    }
}
